Inside Macintosh: QuickTime Components

| Previous | Chapter contents | Chapter top | Section top | Next |

Finding a Specific Movie Data Exchange Component

If you are going to specify a particular data exchange component to the Movie Toolbox, you must first open a connection to that component. Use the Component Manager's OpenDefaultComponent or OpenComponent function to open a connection to a movie data exchange component (see the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for more information about these functions). Before you can open that connection, however, you must find an appropriate movie data exchange component.

To find an appropriate data exchange component, you may need to use the Component Manager's FindNextComponent function. You specify the characteristics of the component you are seeking in a component description record--in particular, in the componentType , componentSubtype , componentManufacturer , and componentFlags fields.

Movie data import components have a component type value of 'eat ' , which is defined by the MovieImportType constant. Movie data export components have a type value of 'spit' , which is defined by the MovieExportType constant.

Movie data exchange components use their component subtype and manufacturer values to indicate the type of data that they support. The subtype value indicates the type of data that these components can import or export. For example, movie data import components that convert text into QuickTime movie data have a component subtype value of 'TEXT' . A single data exchange component may support only one data type.

The manufacturer field indicates the QuickTime media type that is supported by the component. For example, movie data export components that can read data from a sound media have a manufacturer value of 'soun' (this value is defined by the SoundMediaType constant). If a data exchange component can work with more than one media type, it specifies a manufacturer value of 0.

In addition, these components use the componentFlags field to indicate more specific information about their capabilities. The following flags are currently defined:

enum {
    canMovieImportHandles                   = 1,    /* can import from
                                                        handles */
    canMovieImportFiles                     = 2,    /* can import from files */
    hasMovieImportUserInterface             = 4,    /* import has user
                                                        interface */
    canMovieExportHandles                   = 8,    /* can export to handles */
    canMovieExportFiles                     = 16,   /* can export to files */
    hasMovieExportUserInterface             = 32,   /* export has user
                                                        interface */
    dontAutoFileMovieImport                 = 64    /* turn off automatic file
                                                        conversion */
};

Movie data import components use the first three flags to specify their capabilities. If a component can convert data from a handle, its canMovieImportHandles flag is set to 1. If it can work with files, its canMovieImportFiles flag is set to 1. Note that both of these flags may be set to 1 if a single component can work with both files and handles. If a component provides a dialog box that allows the user to specify configuration information, the hasMovieImportUserInterface flag is set to 1. If a component does not support the automatic conversion of standard files to movies in an import component, set the dontAutoFileMovieImport flag to 1 (the default setting is 0).

Movie data export components use the other three flags in the same way.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |